<template>
  <div id="app">
    <!-- <button @click="dian">dian</button> -->
    <router-view />
  </div>
</template>

<script>
import { mapGetters } from 'vuex';

export default {
  data() {
    return {}
  },
  computed: {
    ...mapGetters(['isIframe'])
  },
  created() {
    this.$store.commit(
      'globalParameter/setIsIframe',
      window.top !== window.self
    )
  },
  methods: {
    dian() {
      window.parent.postMessage({
        isIframe: this.isIframe,
        id: 456,
        name: 'name'
      }, '*')
    }
  },
}
</script>

<style>
#app {
  width: 100%;
  height: 100%;
}

.iframeclass {
  width: 100%;
  height: 100%;
}
</style>
